/**
 * @ author: 汪孟苹
 */
define(["jquery",
    "scprit/followup/app/datatable/datatable.ui.js",
    "scprit/followup/app/surveyStageAssess/surveyStagePatient.servers.js",
    "scprit/followup/app/surveyStageAssess/surveyStagePatient.event.js"],
    function ($,$datatableUi,$surveyStagePatientServers,$surveyStagePatientEvent) {
    var surveyStagePatient = {};

    var commInit = function(data){
        $("#addSurveyStageQuestBtn").data({"value":data});
        $("#addSurveyStageQuestBtn").click($surveyStagePatientEvent.onAddSurveyStageQuestBtn);
        $datatableUi.init({
            "id": data.tableId,
            "options": $surveyStagePatientServers.getOptions()
        });
    }

    surveyStagePatient.init01 = function(){
        var data = {
            busiId:"maternalPre1214",
            openPage:"surveyStageQuest01",
            tableId:"surveyStagePatient01"
        };
        commInit(data); 
    }
    surveyStagePatient.init02 = function(){
        var data = {
            busiId:"maternalPre0028",
            openPage:"surveyStageQuest02",
            tableId:"surveyStagePatient02"
        };
        commInit(data); 
    }
    surveyStagePatient.init03 = function(){
        var data = {
            busiId:"maternalPre2840",
            openPage:"surveyStageQuest03",
            tableId:"surveyStagePatient03"
        };
        commInit(data);
    }
    surveyStagePatient.init04 = function(){
        var data = {
            busiId:"maternalDelivery",
            openPage:"surveyStageQuest04",
            tableId:"surveyStagePatient04"
        };
        commInit(data);
    }
    surveyStagePatient.init05 = function(){
        var data = {
            busiId:"maternalPre42day",
            openPage:"surveyStageQuest05",
            tableId:"surveyStagePatient05"
        };
        commInit(data);
    }

    return surveyStagePatient;
});